import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import mutations from './mutations'
import createLogger from 'vuex/dist/logger'; // 开启vuex调试
const debug = process.env.NODE_ENV !== 'production'; // 开发环境中为true，否则为false
Vue.use(Vuex)
export default new Vuex.Store({
  state: state,
  mutations: mutations,
  plugins: debug ? [createLogger()] : []
})
